package models

import (
		"test/libraries"
	"gopkg.in/mgo.v2"
	"fmt"
)


type NotifyInfo struct {
	mongoDb libraries.MongoDB
	collection *mgo.Collection

}


func (this *NotifyInfo) init(){
	//collection_string := "notify_info"
}

func (this *NotifyInfo) Get(){
	//collection.Find()
	var p int
	var err error
	collection := this.mongoDb.SetCollection("notify_info")

	p, err = collection.Count()

	if err != nil {
		panic(err)
	}

	fmt.Println(p)
}

func (this *NotifyInfo) SaveInfo(data interface{}){
	collection := this.mongoDb.SetCollection("notify_info")

	collection.Insert(data)
}